			<div>
				<ul class="breadcrumb">
					<li>
						<a href="<?php echo site_url("menu/survey"); ?>">Quản lý khảo sát</a> / 
                        <a href="<?php echo site_url("surveytype"); ?>">Loại khảo sát</a> / 
                        <a href="<?php echo site_url("survey/index/".$st->survey_type_id);?>"><?php echo $st->survey_type_name; ?></a> / 
						<a href="<?php echo site_url("survey/details/".$survey->survey_id);?>"><?php echo $survey->survey_name; ?></a> / 
                        Sửa phiếu khảo sát
					</li>
				</ul>
			</div>
			<div class="row-fluid">
				<div class="box span12">
					<div class="box-header well">
						<h2><i class="icon-pencil"></i> Bước 1: Thông tin phiếu khảo sát</h2>
						<div class="box-icon">
							<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
						</div>
					</div>
					<div class="box-content">
						<form class="form-horizontal" method="post">
							<fieldset>
								<div class="control-group">
									<label class="control-label" for="sname">Tên phiếu khảo sát</label>
									<div class="controls">
										<input class="input-xlager span8" id="sname" name="sname" type="text" value="<?php echo set_value('sname', $survey->survey_name);?>"/>
										<?php echo form_error('sname'); ?>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label" for="rsid">Sử dụng lại</label>
									<div class="controls">
										<select id="rsid" name="rsid" class="span8" data-rel="chosen">
                                            <option></option>
                                            <?php foreach ($slist as $s) { ?>
											    <option value="<?php echo $s->survey_id; ?>" <?php echo set_select('rsid', $s->survey_id, $s->survey_id == $survey->reused_survey_id ? TRUE : FALSE);?>>
													<?php echo $s->survey_name; ?>
												</option>
                                            <?php }; ?>
										</select>
										<?php echo form_error('rsid'); ?>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label" for="isvoc">Bậc</label>
									<div class="controls">
										<select id="isvoc" name="isvoc" class="span4" data-rel="chosen">
											<option value="true" <?php echo set_select('isvoc', 'true', $survey->is_vocation == TRUE ? TRUE : FALSE);?>>Đại học</option>
											<option value="false" <?php echo set_select('isvoc', 'false', $survey->is_vocation == FALSE ? TRUE : FALSE);?>>Trung cấp chuyên nghiệp</option>
										</select>
										<?php echo form_error('isvoc'); ?>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label" for="isgrad">Đã tốt nghiệp</label>
									<div>
										<label class="checkbox inline">
											<input type="checkbox" id="isgrad" name="isgrad" value="true" <?php echo set_checkbox('isgrad', 'true', $survey->is_graduated == TRUE ? TRUE : FALSE);?>/>
										</label>
									</div>
								</div>
                                <div class="control-group" id="course-group">
									<label class="control-label" for="course">Khóa</label>
									<div class="controls">
										<select id="course" name="course" class="span2" data-rel="chosen">
											<option></option>
											<?php foreach($clist as $course){?>
												<option value="<?php echo $course;?>" <?php echo set_select('course', $course, $course == $survey->course ? TRUE : FALSE);?>><?php echo $course;?></option>
											<?php };?>
										</select>
										<?php echo form_error('course');?>
									</div>
								</div>
								<div class="control-group" id="gyear-group">
									<label class="control-label" for="gyear">Năm tốt nghiệp</label>
									<div class="controls">
										<select id="gyear" name="gyear" class="span2" data-rel="chosen">
											<option></option>
											<?php foreach($gylist as $gyear){?>
												<option value="<?php echo $gyear;?>" <?php echo set_select('gyear', $gyear, $gyear == $survey->graduated_year ? TRUE : FALSE); ?>><?php echo $gyear;?></option>
											<?php };?>
										</select>
                                        <?php echo form_error('gyear'); ?>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label" for="sdate">Áp dụng từ ngày</label>
									<div class="controls">
										<input type="text" class="input-xlager datepicker span2" id="sdate" name="sdate" value="<?php echo set_value('sdate', $survey->start_date);?>" />
                                        <?php echo form_error('sdate'); ?>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label" for="edate">đến ngày</label>
									<div class="controls">
										<input type="text" class="input-xlager datepicker span2" id="edate" name="edate" value="<?php echo set_value('edate', $survey->end_date);?>" />
                                        <?php echo form_error('edate'); ?>
                                        <?php echo $check_duration; ?>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label" for="iseval"></label>
									<div>
										<label class="checkbox inline">
											<input type="checkbox" id="iseval" name="iseval" value="true" <?php echo set_checkbox('iseval', 'true', $survey->is_evaluated == TRUE ? TRUE : FALSE);?>/>Phiếu khảo sát này cần được đánh giá 
										</label>
									</div>
								</div>
								<div class="form-actions">
									<button type="submit" name="submit" value="next" class="btn btn-primary"> Tiếp bước 2</button>
									<a class="btn" href="<?php echo site_url("survey/index/".$st->survey_type_id);?>">Hủy</a>
								</div>
							</fieldset>
						</form>
					</div>
				</div><!--/span-->
            </div>
    <!-- Placed at the end of the document so the pages load faster -->
    <!-- Internal Script -->
    <script type="text/javascript">
        $(document).ready(function(){
            //Event of isgraduated checkbox
			if($('#isgrad').is(':checked'))
				$('#course-group').hide();
			else
				$('#gyear-group').hide();
			
            $('#isgrad').change(function(){
                var val = $(this).is(':checked');
                if(val == true){
                    $('#course').val('');
                    $('#course-group').hide();
                    $('#gyear-group').show();
                }
                else{
                    $('#gyear').val('');
                    $('#gyear-group').hide();
                    $('#course-group').show();
                }
            });
        });
    </script>
    <!-- End Internal Script -->